package com.payment.system.service.impl;

import com.payment.system.domain.ShoppingOrderShipment;
import com.payment.system.mapper.ShoppingOrderShipmentMapper;
import com.payment.system.service.IShoppingOrderShipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单配送 服务层实现
 * 
 * @author payment
 * @date 2019-02-15
 */
@Service
public class ShoppingOrderShipmentServiceImpl implements IShoppingOrderShipmentService
{
	@Autowired
	private ShoppingOrderShipmentMapper shoppingOrderShipmentMapper;

	/**
     * 查询订单配送信息
     * 
     * @param id 订单配送ID
     * @return 订单配送信息
     */
    @Override
	public ShoppingOrderShipment selectShoppingOrderShipmentById(String id)
	{
	    return shoppingOrderShipmentMapper.selectShoppingOrderShipmentById(id);
	}
	
	/**
     * 查询订单配送列表
     * 
     * @param shoppingOrderShipment 订单配送信息
     * @return 订单配送集合
     */
	@Override
	public List<ShoppingOrderShipment> selectShoppingOrderShipmentList(ShoppingOrderShipment shoppingOrderShipment)
	{
	    return shoppingOrderShipmentMapper.selectShoppingOrderShipmentList(shoppingOrderShipment);
	}
	
    /**
     * 新增订单配送
     * 
     * @param shoppingOrderShipment 订单配送信息
     * @return 结果
     */
	@Override
	public int insertShoppingOrderShipment(ShoppingOrderShipment shoppingOrderShipment)
	{
	    return shoppingOrderShipmentMapper.insertShoppingOrderShipment(shoppingOrderShipment);
	}

	//根据订单id 查询订单配送
	@Override
	public ShoppingOrderShipment selectShoppingOrderShipmentByOrderId(String orderId) {
		return shoppingOrderShipmentMapper.selectShoppingOrderShipmentByOrderId(orderId);
	}


}
